<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>Add a new employee</h:head>
<body>
	<ui:composition template="/Template/TemplateAdmin.xhtml">
		<ui:define name="AdminContent">
									<p:dialog header="Pay Employees" widgetVar="dialogYes"
								minHeight="40">
								<p:panelGrid columns="1">
									<h:outputText value="operation carried out" />
									<p:button value="Ok" outcome="PayRollPage"></p:button>
								</p:panelGrid>
							</p:dialog>
							<p:dialog header="Add Employee" widgetVar="dialogNo"
								minHeight="40">
								<p:panelGrid columns="1">
									<h:outputText value="No Employees " />
								</p:panelGrid>
							</p:dialog>
		<h:form >
			<p:commandButton action="#{payRollPageView.PayEmployee()}" value="Pay Employee"></p:commandButton>
		</h:form>
		<p:dataTable var="report" value="#{payRollPageView.report}" emptyMessage="No Employee to pay ">
			<f:facet name="header">Pay Report</f:facet>
			<p:column headerText="Code">
				<h:outputText value="#{report.employee.codfisc}" />
			</p:column>
			<p:column headerText="Name">
				<h:outputText value="#{report.employee.surname}" />&nbsp; <h:outputText value="#{report.employee.name}" />
			</p:column>
			<p:column headerText="Type">
				<h:outputText value="#{report.employee.getClass().getSimpleName()}" />
			</p:column>
			<p:column headerText="Pay">
				<h:outputText value="#{report.amount}" />
			</p:column>
		</p:dataTable>
		</ui:define>
	</ui:composition>
</body>
</html>